package cn.itcast.service.impl;

import cn.itcast.Dao.RoleDao;
import cn.itcast.domain.Role;
import cn.itcast.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author wgq
 * @date 2019-09-20 18:41
 */
@Service
public class RoleServiceImpl implements RoleService {
    @Autowired
    private RoleDao roleDao;
    @Override
    public List<Role> list() {
        List<Role> roleList = roleDao.findAllRoles();
        return roleList;
    }

    @Override
    public void save(Role role) {
        roleDao.save(role);
    }
}
